package com.umeng.analytics;

import android.content.Context;
import android.text.TextUtils;

import com.umeng.analytics.pro.bv;
import com.umeng.analytics.pro.by;
import com.umeng.analytics.pro.cc;

public class AnalyticsConfig {
    public static boolean ACTIVITY_DURATION_OPEN;
    public static boolean CATCH_EXCEPTION;
    public static String GPU_RENDERER;
    public static String GPU_VENDER;
    static double[] a;
    private static String b;
    private static String c;
    private static String d;
    private static int e;
    public static long kContinueSessionMillis;
    public static String mWrapperType;
    public static String mWrapperVersion;
    public static boolean sEncrypt;
    public static int sLatentWindow;

    static {
        AnalyticsConfig.b = null;
        AnalyticsConfig.c = null;
        AnalyticsConfig.d = null;
        AnalyticsConfig.mWrapperType = null;
        AnalyticsConfig.mWrapperVersion = null;
        AnalyticsConfig.e = 0;
        AnalyticsConfig.GPU_VENDER = "";
        AnalyticsConfig.GPU_RENDERER = "";
        AnalyticsConfig.ACTIVITY_DURATION_OPEN = true;
        AnalyticsConfig.CATCH_EXCEPTION = true;
        AnalyticsConfig.kContinueSessionMillis = 30000;
        AnalyticsConfig.sEncrypt = false;
        AnalyticsConfig.a = null;
    }

    public AnalyticsConfig() {

    }

    static void a(Context arg2, int arg3) {
        AnalyticsConfig.e = arg3;
        cc.a(arg2).a(AnalyticsConfig.e);
    }

    static void a(Context arg2, String arg3) {
        if (arg2 == null) {
            AnalyticsConfig.b = arg3;
        } else {
            String v0 = bv.p(arg2);
            if (!TextUtils.isEmpty(((CharSequence) v0))) {
                AnalyticsConfig.b = v0;
                if (!v0.equals(arg3)) {
                    by.d("Appkey和AndroidManifest.xml中配置的不一致 ");
                }
            } else {
                v0 = cc.a(arg2).c();
                if (TextUtils.isEmpty(((CharSequence) v0))) {
                    cc.a(arg2).a(arg3);
                } else if (!v0.equals(arg3)) {
                    by.d("Appkey和上次配置的不一致 ");
                    cc.a(arg2).a(arg3);
                }

                AnalyticsConfig.b = arg3;
            }
        }
    }

    static void a(String arg0) {
        AnalyticsConfig.c = arg0;
    }

    static void a(boolean arg0) {
        AnalyticsConfig.sEncrypt = arg0;
    }

    static void b(Context arg2, String arg3) {
        if (!TextUtils.isEmpty(((CharSequence) arg3))) {
            AnalyticsConfig.d = arg3;
            cc.a(arg2).c(AnalyticsConfig.d);
        }
    }

    public static String getAppkey(Context arg1) {
        if (TextUtils.isEmpty(AnalyticsConfig.b)) {
            String v0 = bv.p(arg1);
            AnalyticsConfig.b = v0;
            if (TextUtils.isEmpty(((CharSequence) v0))) {
                AnalyticsConfig.b = cc.a(arg1).c();
            }
        }

        return AnalyticsConfig.b;
    }

    public static String getChannel(Context arg1) {
        if (TextUtils.isEmpty(AnalyticsConfig.c)) {
            AnalyticsConfig.c = bv.s(arg1);
        }

        return AnalyticsConfig.c;
    }

    public static double[] getLocation() {
        return AnalyticsConfig.a;
    }

    public static String getSDKVersion(Context arg1) {
        return "6.1.1";
    }

    public static String getSecretKey(Context arg1) {
        if (TextUtils.isEmpty(AnalyticsConfig.d)) {
            AnalyticsConfig.d = cc.a(arg1).e();
        }

        return AnalyticsConfig.d;
    }

    public static int getVerticalType(Context arg1) {
        if (AnalyticsConfig.e == 0) {
            AnalyticsConfig.e = cc.a(arg1).f();
        }

        return AnalyticsConfig.e;
    }
}

